package eu.szemraj.logging.channel {
	import flash.external.ExternalInterface;
	import eu.szemraj.managers.SingletonManager;
	import eu.szemraj.logging.LogLevel;
	import eu.szemraj.logging.channel.ILogChannel;

	/**
	 * @author sema
	 */
	public class FirebugChannel implements ILogChannel {
		
		public function FirebugChannel() {
			
			
			SingletonManager.checkSingleton( this );
		}
		
		/**
		 * @inheritDoc
		 */
		public function log(message:*, logLevel:LogLevel, loggingObject:String):void {
			
			var jsCall:String = "console.";
			switch( logLevel ) {
				
				
				case LogLevel.NONE : break;				case LogLevel.INFO : 
					jsCall += "info";
			    break;
			    case LogLevel.DEBUG : 
					jsCall += "debug";
			    break;
			    case LogLevel.WARN : 
					jsCall += "warn";
			    break;
			    case LogLevel.ERROR : 
			    case LogLevel.FATAL : 
					jsCall += "error";
			    break;
			}
			ExternalInterface.call( jsCall, message );
		}

		public function inspectObject(object:*, objectName:String = "object"):void {
		}
		
		public function clearOutput():void {
		}
	}
}
